load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("sapling")

rust_library(
    name = "virtual-tree",
    srcs = glob([
        "src/**/*.rs",
        "src/**/*.zst",
    ]),
    autocargo = {"cargo_toml_config": {
        "dependencies_override": {"dependencies": {
            "smallvec": {
                "default-features": False,
                "features": [],
            },
        }},
        "package": {
            "authors": ["Meta Source Control Team <sourcecontrol-dev@meta.com>"],
            "description": "Generate source control trees on demand for testing purpose.",
            "homepage": "https://sapling-scm.com/",
            "license": "MIT",
            "name": "sapling-virtual-tree",
            "repository": "https://github.com/facebook/sapling",
        },
        "profile": {
            "release": {
                # used by 'cargo test --release'
                "overflow-checks": True,
            },
        },
    }},
    crate_root = "src/lib.rs",
    deps = [
        "fbsource//third-party/rust:parking_lot",
        "fbsource//third-party/rust:smallvec",
        "//eden/scm/lib/vlqencoding:vlqencoding",
        "//eden/scm/lib/zstdelta:zstdelta",
    ],
)
